package com.evan.common.bit;

public enum RoleType {

    ADMIN("管理员"),
    GUEST("访客"),;

    private String name;

    RoleType(String name){
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public static RoleType getInstance(String val){
        for (RoleType bit : RoleType.values()) {
            if(bit.getName().equals(val)){
                return bit;
            }
        }
        return null;
    }
}
